#include "VolumeUnit.h"

const VolumeUnit& TSP  = VolumeUnit::getTSP();
const VolumeUnit& TBSP = VolumeUnit::getTBSP();
const VolumeUnit& OZ   = VolumeUnit::getOZ();
VolumeUnit* VolumeUnit::baseUnit_m = NULL;

VolumeUnit::VolumeUnit(int ratio, std::string name):Unit(ratio, name)
{
   if ( 1 == ratio )
    baseUnit_m = this;
}

VolumeUnit& VolumeUnit::getTSP()
{
   static VolumeUnit tsp(1,"TSP");
   return tsp;
}

VolumeUnit& VolumeUnit::getTBSP()
{
   static VolumeUnit tbsp(3,"TBSPs");
   return tbsp;
}

VolumeUnit& VolumeUnit::getOZ()
{
   static VolumeUnit oz(6,"OZ");
   return oz;
}

VolumeUnit & VolumeUnit::baseUnit()
{
   return *baseUnit_m;
}

